<!DOCTYPE html>
<html>
	<meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<head>
		<title>An African Language Short Story Competition</title>
	</head>

	<body>
	    <ul>
	    <li><a id="home" href="index1.php">Home</a></li>
	    <li><a id="original" href="submit1.php">Original Story Submission</a></li>
            <li><a id="translation" href="submittranslation1.php">Translated Story Submission</a></li>
            <li><a id="stories" class=active href="#">Submitted Stories</a></li>
	    <li><a id="statistics" href="submissionstatistics1.php">Submissions per Language</a></li>
            <li><a id="coordinate" href="coordinator1.php">Coordinator Application</a></li>
            <li><a id="contact" href="contact1.php">Contact</a></li>
            <li><a id="resources" href="resources1.php">Resources</a></li>
            <li><a id="flyers" href="flyers1.php">Flyers</a></li>
            <li><a id="faq" href="faq1.php">Frequently Asked Questions</a></li>
            <li><a id="privacy" href="privacy1.php">Privacy</a></li>
	    </ul>
	    <header>
			<h1>Tuvute Pamoja
			<a href="https://deeplearningindaba.com">
                         <img src="images/deeplearningindaba.svg" alt="Deeplearning Indaba" style="height:60px">
			</a></h1>
        </header>
<?php include 'submitdatabaseinfo.php';?>
<?php include 'submitsetup.php';?>

		<h1 id="title">An African Language Short Story Competition</h1>
<div>
<p>The stories are provided under a creative commons attribution license that allows others to distribute, remix, adapt and build upon the work, even commercially, as long as they credit the authors for the original creation. For more on this license see <a href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</a>.  The submitted stories are provided here to allow for translation and evaluation. To enable a fairer evaluation of the stories, the authors and translators will remain unknown until after the evaluation process. Should you wish to reuse and redistribute the stories please be sure to do so once you can attribute the authors and translators.</p>
</div>
<div>

<h3 id="languageselection">Choose a language you want to read stories in</h3>
</div>
<div>
	<select class="language" id="languagefromoptions" name="languagefromoptions" 
           onchange="getstorytitles(this.value)">
        <option data-language="Amharic" value="amh">አማርኛ</option>
        <optgroup label="اَلْعَرَبِيَّةُ">
                <option data-language="Egyptian Arabic" value="arz">العامية المصرية</option>
                <option data-language="Standard Arabic" value="arb">العربية الفصحى</option>
                <option data-language="Sudanese Arabic" value="apd">لهجة سودانية</option>
	</optgroup>
        <option data-language="Afrikaans" value="afr">Afrikaans</option>
        <option data-language="Bangime" value="dba">Bangime</option>
        <option data-language="Basaa" value="bas">Basaa</option>
        <option data-language="Bemba" value="ben">Bemba</option>
        <option data-language="Chichewa" value="nya">Chichewa</option>
        <option data-language="Dagbani" value="dag">Dagbani</option>
        <option data-language="Dholuo" value="luo">Dholuo</option>
        <optgroup label="Dogon">
                <option data-language="Ben Tey Dogon" value="BTD">Ben Tey Dogon</option>
                <option data-language="Najamba-Kindige" value="N-K">Najamba-Kindige</option>
        </optgroup>
        <option data-language="Douala" value="dua">Douala</option>
        <option data-language="Ewondo" value="ewo">Ewondo</option>
        <option data-language="Fefe" value="fmp">Féfé</option>
        <optgroup label="Fulfulde">
                <option data-language="Adamawa Fulfulde" value="fub">Adamawa Fulfulde</option>
                <option data-language="Bagirmi Fulfulde" value="fui">Bagirmi Fulfulde</option>
                <option data-language="Borgu Fulfulde" value="fue">Borgu Fulfulde</option>
                <option data-language="Central Eastern Niger Fulfulde" value="fuq">Central Eastern Niger Fulfulde</option>
                <option data-language="Maasina Fulfulde" value="ffm">Maasina Fulfulde</option>
                <option data-language="Nigerian Fulfulde" value="fuv">Nigerian Fulfulde</option>
                <option data-language="Pulaar" value="fuc">Pulaar</option>
                <option data-language="Pular" value="fuf">Pular</option>
                <option data-language="Western Niger Fulfulde" value="fuh">Western Niger Fulfulde</option>
        </optgroup>
        <option data-language="Ga" value="gaa">Ga</option>
        <option data-language="Ghomala" value="gho">Ghomala</option>
        <option data-language="Kikuyu" value="kik">Gĩkũyũ</option>
        <option data-language="Gonja" value="gjn">Gonja</option>
        <option data-language="Hausa" value="hau">Hausa</option>
        <option data-language="Igbo" value="ibo">Igbo</option>
        <optgroup label="Ndebele">
                <option data-language="IsiNdebele saseNyakatho" value="nde">IsiNdebele saseNyakatho</option>
                <option data-language="IsiNdebele seSewula" value="nbl">IsiNdebele seSewula</option>
        </optgroup>
        <option data-language="Xhosa" value="xho">isiXhosa</option>
        <option data-language="Zulu" value="zul">isiZulu</option>
        <optgroup label="Jóola">
                <option data-language="Bandial" value="bqj">Bandial</option>
                <option data-language="Karon" value="krx">Karon</option>
        </optgroup>
        <optgroup label="Kamba">
                <option data-language="Dhaiso" value="dhs">Dhaiso</option>
                <option data-language="Kamba" value="kam">Kamba</option>
        </optgroup>
        <option data-language="Kidawida" value="dav">Kidawida</option>
        <option data-language="Kigiriyama" value="nyf">Kigiriyama</option>
        <optgroup label="Kimeru (Kenya)">
                <option data-language="Kimeru" value="mer">Meru</option>
                <option data-language="Tharaka" value="thk">Tharaka</option>
                <option data-language="Mwimbi-Muthambi" value="mws">Mwimbi-Muthambi</option>
                <option data-language="Cuka" value="cuh">Cuka</option>
        </optgroup>
        <option data-language="Kinyarwanda" value="kin">Kinyarwanda</option>
        <option data-language="Kipsigis" value="sgc">Kipsigis</option>
        <option data-language="Kiswahili" value="swa">Kiswahili</option>
        <option data-language="Kom" value="bkm">Kom</option>
        <option data-language="Konkomba" value="xon">Konkomba</option>
        <option data-language="Lingala" value="lin">Lingala</option>
        <option data-language="Luganda" value="lug">Luganda</option>
        <optgroup label="Luhya">
                <option data-language="Lubukusu" value="bsk">Lubukusu</option>
                <option data-language="Luidhako" value="ida">Luidhako</option>
                <option data-language="Lulogoli" value="rag">Lulogoli</option>
                <option data-language="Lukabrasi" value="lkb">Lukabrasi</option>
                <option data-language="Lunyala" value="nle">Lunyala</option>
                <option data-language="Lusamia" value="lsm">Lusamia</option>
                <option data-language="Lutachoni" value="lts">Lutachoni</option>
                <option data-language="Olukhayo" value="lko">Olukhayo</option>
                <option data-language="Olukisa" value="lks">Olukisa</option>
                <option data-language="Olumarama" value="lrm">Olumarama</option>
                <option data-language="Olunyole" value="nyd">Olunyole</option>
                <option data-language="Olutsotso" value="lto">Olutsotso</option>
                <option data-language="Oluwanga" value="lwa">Oluwanga</option>
        </optgroup>
        <option data-language="Medumba" value="byv">Medumba</option>
        <option data-language="Mende" value="men">Mende</option>
        <optgroup label="Meru (Tanzania)">
                <option data-language="Machame" value="imc">Machame</option>
                <option data-language="Rwa" value="rwk">Rwa</option>
        </optgroup>
        <option data-language="Nda\'nda\'" value="nnz">Nda'nda'</option>
        <option data-language="Ngiemboon" value="nnh">Ngiemboon</option>
        <option data-language="Nigerian Pidgin" value="pcm">Nigerian Pidgin</option>
        <option data-language="Nuasue" value="yav">Nuasue</option>
        <option data-language="Ŋgə̂mbà" value="nge">Ŋgə̂mbà</option>
        <option data-language="Runyakitara" value="213">Runyakitara</option>
        <option data-language="Safaliba" value="saf">Safaliba</option>
        <optgroup label="Sena">
                <option data-language="Barwe" value="bwg">Barwe</option>
                <option data-language="Malawian Sena" value="swk">Malawian Sena</option>
                <option data-language="Mozambiquean Sena" value="seh">Mozambiquean Sena</option>
        </optgroup>
        <option data-language="Sesotho" value="sot">Sesotho</option>
        <option data-language="Setswana" value="tsn">Setswana</option>
        <option data-language="Shü Pamom" value="bax">Shü Pamom</option>
        <option data-language="siSwati" value="ssw">siSwati</option>
        <option data-language="Twi" value="twi">Twi</option>
        <option data-language="Urhobo" value="urh">Urhobo</option>
        <option data-language="Wolaytta" value="wal">Wolaytta</option>
        <option data-language="Wolof" value="wol">Wolof</option>
        <option data-language="Xitsonga" value="tso">Xitsonga</option>
        <option data-language="Yambeta" value="yat">Yambeta</option>
        <option data-language="Yoruba" value="yor">Yorùbá</option>
        <option data-language="Zarma" value="dje">Zarma</option>
        </select>
   </p>
</div>
</section>
<section>
<div>
<table id="titles"></table>
</div>
</section>
<section>
<p id="story">
</p>
</section>
</body>
<?php include 'footer.php';?>
<script>
function getstorytitles(lang) {

  //use ajax to get stories from database in that language	
  var xmlhttp = new XMLHttpRequest();
  xmlhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
      document.getElementById("titles").innerHTML = this.responseText;
    }
  };
  xmlhttp.open("GET","gettitles1.php?lang="+lang,true);
  xmlhttp.send();
}

function getstory(storyid) {
 //use ajax to get stories from database in that language      
  var xmlhttp = new XMLHttpRequest();
  xmlhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
      document.getElementById("story").innerHTML = this.responseText;
    }
  };
  xmlhttp.open("GET","getstory1.php?primarykey="+storyid,true);
  xmlhttp.send();
}
</script>
</html>

